inherited fmDateRaspred: TfmDateRaspred
  Left = 463
  Top = 79
  Width = 391
  Height = 787
  BorderIcons = [biSystemMenu]
  Caption = #1044#1072#1090#1072' '#1080' '#1087#1088#1080#1095#1080#1085#1072
  Constraints.MaxWidth = 391
  Constraints.MinHeight = 748
  Constraints.MinWidth = 391
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 733
    Width = 383
  end
  inherited Panel1: TPanel
    Width = 383
    inherited BitBtn1: TBitBtn
      Left = 213
    end
    inherited BitBtn2: TBitBtn
      Left = 301
    end
  end
  object Panel2: TPanel [2]
    Left = 0
    Top = 189
    Width = 383
    Height = 421
    Align = alTop
    TabOrder = 2
    object Label5: TLabel
      Left = 9
      Top = 101
      Width = 111
      Height = 16
      Caption = #1050#1091#1076#1072' '#1087#1077#1088#1077#1074#1086#1076#1080#1084
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label6: TLabel
      Left = 8
      Top = 46
      Width = 102
      Height = 16
      Caption = #1044#1072#1090#1072' '#1087#1077#1088#1077#1074#1086#1076#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label7: TLabel
      Left = 171
      Top = 46
      Width = 163
      Height = 16
      Caption = #1053#1086#1074#1072#1103' '#1076#1072#1090#1072' '#1080#1089#1082#1083#1102#1095#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label8: TLabel
      Left = 8
      Top = 10
      Width = 102
      Height = 16
      Caption = #1044#1072#1090#1072' '#1087#1077#1088#1077#1074#1086#1076#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clMaroon
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object dbTW: TdxDBTreeView
      Left = 4
      Top = 122
      Width = 368
      Height = 279
      ShowNodeHint = True
      RowSelect = True
      DataSource = dsSD
      DisplayField = 'SDNAME'
      KeyField = 'SDID'
      ListField = 'SDNAME'
      ParentField = 'SDPARID'
      RootValue = 0
      SeparatedSt = '-'
      StateIndexField = 'SDISDELETE'
      RaiseOnError = True
      ReadOnly = True
      Indent = 19
      Align = alCustom
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = []
      ParentColor = False
      Options = [trCanDBNavigate]
      SelectedIndex = 1
      TabOrder = 0
      ParentFont = False
      ParentShowHint = False
      ShowHint = False
      StateImages = DMInv.ilBJTree
    end
    object cxDateEdit2: TcxDateEdit
      Left = 8
      Top = 66
      ParentFont = False
      Properties.InputKind = ikMask
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 1
      Width = 137
    end
    object cxDateEdit3: TcxDateEdit
      Left = 171
      Top = 66
      ParentFont = False
      Properties.InputKind = ikMask
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 2
      Width = 137
    end
  end
  object Panel3: TPanel [3]
    Left = 0
    Top = 73
    Width = 383
    Height = 68
    Align = alTop
    TabOrder = 3
    object Label2: TLabel
      Left = 9
      Top = 5
      Width = 113
      Height = 16
      Caption = #1044#1072#1090#1072' '#1074#1082#1083#1102#1095#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label3: TLabel
      Left = 158
      Top = 5
      Width = 119
      Height = 16
      Caption = #1044#1072#1090#1072' '#1080#1089#1082#1083#1102#1095#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object cxDBDateEdit1: TcxDBDateEdit
      Left = 8
      Top = 22
      DataBinding.DataField = 'DPDATEIN'
      DataBinding.DataSource = dlgDS
      ParentFont = False
      Properties.InputKind = ikMask
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 0
      Width = 137
    end
    object cxDBDateEdit2: TcxDBDateEdit
      Left = 157
      Top = 22
      DataBinding.DataField = 'DPDATEOUT'
      DataBinding.DataSource = dlgDS
      ParentFont = False
      Properties.InputKind = ikMask
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 1
      Width = 137
    end
  end
  object Panel4: TPanel [4]
    Left = 0
    Top = 141
    Width = 383
    Height = 48
    Align = alTop
    TabOrder = 4
    object Label4: TLabel
      Left = 8
      Top = 0
      Width = 218
      Height = 16
      Caption = #1044#1072#1090#1072' '#1074#1085#1077#1087#1083#1072#1085#1086#1074#1086#1075#1086' '#1080#1089#1082#1083#1102#1095#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object cxDateEdit1: TcxDateEdit
      Left = 8
      Top = 19
      ParentFont = False
      Properties.InputKind = ikMask
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 0
      Width = 137
    end
  end
  object Panel5: TPanel [5]
    Left = 0
    Top = 610
    Width = 383
    Height = 115
    Align = alTop
    TabOrder = 5
    object Label1: TLabel
      Left = 11
      Top = 3
      Width = 56
      Height = 16
      Caption = #1055#1088#1080#1095#1080#1085#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object cxDBMemo1: TcxDBMemo
      Left = 8
      Top = 22
      DataBinding.DataSource = dlgDS
      ParentFont = False
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 0
      Height = 89
      Width = 367
    end
  end
  object Panel6: TPanel [6]
    Left = 0
    Top = 45
    Width = 383
    Height = 28
    Align = alTop
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGreen
    Font.Height = -17
    Font.Name = 'Tahoma'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 6
    object cxLabel1: TcxLabel
      Left = 3
      Top = 1
      Caption = 'cxLabel1'
      Visible = False
    end
  end
  inherited dlgDS: TDataSource
    Left = 160
    Top = 8
  end
  object qSD: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT t1.*, SD1.SDISDELETE'
      'FROM'
      '('
      'WITH   recursive'
      '   tree (SDNAME, SDID, SDPARID, o)'
      
        '   AS (SELECT SD.SDNAME, SD.SDID, sd.SDPARID, CAST('#39#39' AS VARCHAR' +
        '(2048)) AS o FROM SYS_DIC SD'
      '      WHERE sd.SDPARID = :SDPARID'
      '      UNION ALL'
      '      SELECT SD1.SDNAME, SD1.SDID, sd1.SDPARID, '#39#39' || o'
      ''
      '      FROM SYS_DIC SD1'
      '          INNER JOIN tree t '
      '           ON t.sdid = sd1.SDPARID)'
      ' SELECT  o || SDNAME AS SDNAME, SDID, SDPARID FROM tree t'
      ') AS t1'
      'INNER JOIN SYS_DIC sd1 ON sd1.SDID = t1.sdid'
      'order by 1'
      '')
    GeneratorField.Field = 'SDID'
    Left = 48
    Top = 320
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SDPARID'
        ParamType = ptUnknown
      end>
    object qSDSDID: TIntegerField
      FieldName = 'SDID'
      ProviderFlags = []
    end
    object qSDSDPARID: TIntegerField
      FieldName = 'SDPARID'
      ProviderFlags = []
    end
    object qSDSDNAME: TIBStringField
      DisplayLabel = #1069#1083#1077#1084#1077#1085#1090
      FieldName = 'SDNAME'
      ProviderFlags = []
      Size = 2304
    end
    object qSDSDISDELETE: TIntegerField
      DisplayLabel = #1059#1076#1072#1083#1080#1090#1100'?'
      FieldName = 'SDISDELETE'
      Origin = '"SYS_DIC"."SDISDELETE"'
    end
  end
  object dsSD: TDataSource
    DataSet = qSD
    Left = 16
    Top = 320
  end
  object qChek: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT LIST (SD.SDNAME, '#39', '#39') AS podr'
      'FROM DETI_PODRAZD DP'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DP.SDID'
      'WHERE DP.PID = :PID'
      '    AND ((CAST(DP.DPDATEIN AS DATE) BETWEEN :data1 AND :data2)'
      
        '    OR (CAST(COALESCE(DP.DPDATEOUT, CURRENT_TIMESTAMP) AS DATE) ' +
        'BETWEEN :data1 AND :data2)'
      
        '    OR ((CAST(DP.DPDATEIN AS DATE) <= :data1) AND (CAST(COALESCE' +
        '(DP.DPDATEOUT, CURRENT_TIMESTAMP) AS DATE) >= :data2)) )')
    Left = 112
    Top = 8
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end>
    object qChekPODR: TMemoField
      FieldName = 'PODR'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
  end
  object qCheckMisc: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT LIST (SD.SDNAME, '#39', '#39') AS podr'
      'FROM DETI_PODRAZD_MISC DP'
      'INNER JOIN SYS_DIC SD ON SD.SDID = DP.SDID'
      'WHERE DP.PID = :PID'
      '    AND ((CAST(DP.DPDATEIN AS DATE) BETWEEN :data1 AND :data2)'
      
        '    OR (CAST(COALESCE(DP.DPDATEOUT, CURRENT_TIMESTAMP) AS DATE) ' +
        'BETWEEN :data1 AND :data2)'
      
        '    OR ((CAST(DP.DPDATEIN AS DATE) <= :data1) AND (CAST(COALESCE' +
        '(DP.DPDATEOUT, CURRENT_TIMESTAMP) AS DATE) >= :data2)) )')
    Left = 80
    Top = 8
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data1'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'data2'
        ParamType = ptUnknown
      end>
    object MemoField1: TMemoField
      FieldName = 'PODR'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
  end
end
